<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
</head>

<script>
function delcheck() {
	var msg = "您真的确定要删除吗？";
	if(confirm(msg)==true){
		return true;
	}else{
		return false;
	}
}
</script>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">

            <section class="content">
            	<div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">权限分配</h3>
                        <a class="btn btn-default" href="__APP__/console/user_add" style="margin-left:20px;">&nbsp;新增管理员&nbsp;</a>
                        <h4 class="box-title" id="notice" style="margin-left:50px; color:#f00; display:none;"></h4>
                    </div>
                </div>
                
                <volist name="result" id="vo">
                
                <div class="box">
                    <!-- form start -->
                    <form class="form-horizontal" action="" method="post" >
                        <div class="box-body">
                        	<div class="form-group">
                            	<label for="inputEmail3" class="col-sm-2 control-label">{$vo.username}<input type="hidden" name="id" value="{$vo.id}"></label>
                                <div class="col-sm-10">
                                    <div class="checkbox">
                                        <label>
                                        	<if condition="$vo.status eq 1">
                                            <input type="checkbox" checked="checked" name="status" value="1"> 开启用户 &nbsp;&nbsp;&nbsp;
                                            <else/>
                        					<input type="checkbox" name="status" value="1"> 开启用户 &nbsp;&nbsp;&nbsp;
                        					</if>
                                        </label>
                                        
                                        <volist name="authority" id="item">
                                        <label>
                                        	<if condition="in_array($key,$vo['authority'])">
                                            <input type="checkbox" checked="checked" name="{$key}" value="1"> {$item} &nbsp;&nbsp;&nbsp;
                                            <else/>
                                            <input type="checkbox" name="{$key}" value="1"> {$item} &nbsp;&nbsp;&nbsp;
                                            </if>
                                        </label>
                                        </volist>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <button type="submit" class="btn btn-primary" style="margin-left:173px;">&nbsp;修&nbsp;改&nbsp;</button>
                            <a class="btn btn-primary" onClick="javascript:return delcheck()" href="__APP__/console/user_del/id/{$vo.id}" style="margin-left:20px;">&nbsp;删&nbsp;除&nbsp;</a>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                    
                </div>
                
                </volist>
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />
</body>

</html>
